from django.db import models

# Create your models here.

class Exam(models.Model):
    name = models.CharField(max_length=64)
    date_created = models.DateField()
    details = models.CharField(max_length=256)
    date_end = models.DateField()


class Users(models.Model):
    name = models.CharField(max_length=120)
    isTeacher = models.BooleanField()


class ExamAnswers(models.Model):
    idOfQuestion = models.IntegerField()
    answer = models.CharField(max_length=120)
    isCorrect = models.BooleanField()


class ExamQuestions(models.Model):
    idOfExam = models.IntegerField()
    question = models.CharField(max_length=64)


class UserAnsweredExam(models.Model):
    name = models.CharField(max_length=120)
    idOfExam = models.IntegerField()
    howManyCorrect = models.IntegerField()
